package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.struts2.json.annotations.JSON;

@Entity
@Table(name = "t_treasure")
public class TTreasure implements Serializable {
	    private static final long serialVersionUID = 1L;
	    @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    @Basic(optional = false)
	    @Column(name = "id")
	    private Integer id;
	    @Column(name = "name")             
	    private String name;               
	    @Column(name = "code")                
	    private String code;                   
	    @Column(name = "info")
	    private String info;          
	    @Column(name = "receiveway")
	    private String receiveway; 
	    @Column(name = "receivenumber")
	    private String receivenumber;                 
	    @Column(name = "overduetime")                             
		@Temporal(TemporalType.TIMESTAMP)
	    private Date overduetime;    
	    @Column(name = "position")
	    private Integer position; 
	    @Column(name = "user_id")
	    private String userid; 
	    @Column(name = "status")
	    private Integer status; 
	    @Column(name = "winnumber")
	    private String winnumber; 
	    @Column(name = "winsn")
	    private String winsn; 
	    @Column(name = "channel_id")
	    private String channelId; 
	    @Column(name = "comment")
	    private String comment; 
	    
	    public TTreasure(){
	    	
	    }
	    public TTreasure(Integer id){
	    	this.id=id;
	    }
	    
		public Integer getId() {
			return id;
		}
		public void setId(Integer id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		public String getInfo() {
			return info;
		}
		public void setInfo(String info) {
			this.info = info;
		}
		public String getReceiveway() {
			return receiveway;
		}
		public void setReceiveway(String receiveway) {
			this.receiveway = receiveway;
		}
		public String getReceivenumber() {
			return receivenumber;
		}
		public void setReceivenumber(String receivenumber) {
			this.receivenumber = receivenumber;
		}
		@JSON(format="yyyy-MM-dd HH:mm:ss")
		public Date getOverduetime() {
			return overduetime;
		}
		public void setOverduetime(Date overduetime) {
			this.overduetime = overduetime;
		}
		public Integer getPosition() {
			return position;
		}
		public void setPosition(Integer position) {
			this.position = position;
		}
		public String getUserid() {
			return userid;
		}
		public void setUserid(String userid) {
			this.userid = userid;
		}
		public Integer getStatus() {
			return status;
		}
		public void setStatus(Integer status) {
			this.status = status;
		}
		public String getWinnumber() {
			return winnumber;
		}
		public void setWinnumber(String winnumber) {
			this.winnumber = winnumber;
		}
		public String getWinsn() {
			return winsn;
		}
		public void setWinsn(String winsn) {
			this.winsn = winsn;
		}
		public String getChannelId() {
			return channelId;
		}
		public void setChannelId(String channelId) {
			this.channelId = channelId;
		}
		public String getComment() {
			return comment;
		}
		public void setComment(String comment) {
			this.comment = comment;
		}
		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (id != null ? id.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof TTreasure)) {
	            return false;
	        }
	        TTreasure other = (TTreasure) object;
	        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.TTreasure[id=" + id + "]";
	    }
}
